<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SnapDOM - 高性能网页截图解决方案</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
        }
        .serif-font {
            font-family: 'Noto Serif SC', serif;
        }
        .gradient-text {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }
        .feature-icon {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .code-block {
            background: #1a1a2e;
            border-radius: 12px;
            overflow: hidden;
        }
        .code-header {
            background: #16213e;
            padding: 8px 16px;
            font-size: 12px;
            color: #a0a0a0;
        }
        pre {
            margin: 0;
            padding: 16px;
            overflow-x: auto;
        }
        pre code {
            color: #e0e0e0;
            font-size: 14px;
            line-height: 1.6;
        }
        .drop-cap {
            float: left;
            font-size: 4rem;
            line-height: 1;
            font-weight: 700;
            margin-right: 8px;
            margin-top: -8px;
            color: #667eea;
        }
        .section-number {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 50%;
            font-weight: 700;
            margin-right: 16px;
        }
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 2rem 0;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-24 px-6">
        <div class="max-w-6xl mx-auto">
            <div class="text-center">
                <h1 class="text-6xl font-bold mb-6 serif-font">SnapDOM</h1>
                <p class="text-2xl mb-8 opacity-90">高性能网页截图解决方案</p>
                <p class="text-lg max-w-3xl mx-auto leading-relaxed opacity-80">
                    将HTML元素快速、高保真地转换为图像，支持SVG、PNG、JPG、WebP等格式，完美保留样式、字体、伪元素和影子DOM
                </p>
                <div class="mt-12 flex justify-center space-x-6">
                    <a href="https://github.com/zumerlab/snapdom" target="_blank" class="bg-white text-purple-700 px-8 py-3 rounded-full font-semibold hover:bg-gray-100 transition flex items-center">
                        <i class="fab fa-github mr-2"></i>
                        查看源码
                    </a>
                    <a href="#quick-start" class="border-2 border-white text-white px-8 py-3 rounded-full font-semibold hover:bg-white hover:text-purple-700 transition">
                        快速开始
                    </a>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="max-w-6xl mx-auto px-6 py-16">
        <!-- Problem Section -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <span class="section-number">1</span>
                <h2 class="text-3xl font-bold serif-font">它能解决什么问题</h2>
            </div>
            <div class="bg-white rounded-2xl shadow-lg p-8">
                <p class="text-lg leading-relaxed mb-6">
                    <span class="drop-cap serif-font">生</span>成网页截图或将DOM元素转为图像时，开发者常遇到诸多痛点。现有工具如html2canvas在处理复杂DOM结构时速度缓慢、渲染不准确；伪元素、影子DOM或自定义字体经常丢失或渲染错误；大型网页或动态内容捕获时容易出现性能瓶颈或文件过大的问题。
                </p>
                <div class="grid md:grid-cols-3 gap-6 mt-8">
                    <div class="text-center p-6 bg-purple-50 rounded-xl">
                        <i class="fas fa-tachometer-alt text-4xl feature-icon mb-4"></i>
                        <h3 class="font-semibold text-lg mb-2">性能瓶颈</h3>
                        <p class="text-gray-600">复杂页面渲染缓慢</p>
                    </div>
                    <div class="text-center p-6 bg-purple-50 rounded-xl">
                        <i class="fas fa-exclamation-triangle text-4xl feature-icon mb-4"></i>
                        <h3 class="font-semibold text-lg mb-2">渲染失真</h3>
                        <p class="text-gray-600">样式丢失或错误</p>
                    </div>
                    <div class="text-center p-6 bg-purple-50 rounded-xl">
                        <i class="fas fa-file-image text-4xl feature-icon mb-4"></i>
                        <h3 class="font-semibold text-lg mb-2">文件过大</h3>
                        <p class="text-gray-600">输出体积难以控制</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Core Features -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <span class="section-number">2</span>
                <h2 class="text-3xl font-bold serif-font">核心功能概述</h2>
            </div>
            <div class="grid md:grid-cols-2 gap-6">
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start">
                        <i class="fas fa-layer-group text-2xl text-purple-600 mr-4 mt-1"></i>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">全DOM捕获</h3>
                            <p class="text-gray-600">捕获HTML元素，包括伪元素、影子DOM和Web字体，保留所有CSS样式</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start">
                        <i class="fas fa-file-export text-2xl text-purple-600 mr-4 mt-1"></i>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">多格式导出</h3>
                            <p class="text-gray-600">支持SVG、PNG、JPG、WebP和Canvas输出，满足不同使用需求</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start">
                        <i class="fas fa-rocket text-2xl text-purple-600 mr-4 mt-1"></i>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">智能缓存</h3>
                            <p class="text-gray-600">自动预加载字体和图像，减少渲染时间，提升捕获效率</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start">
                        <i class="fas fa-filter text-2xl text-purple-600 mr-4 mt-1"></i>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">过滤与排除</h3>
                            <p class="text-gray-600">支持<code class="bg-gray-100 px-2 py-1 rounded">filter</code>和<code class="bg-gray-100 px-2 py-1 rounded">exclude</code>选项，精确控制捕获内容</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Architecture Visualization -->
        <section class="mb-20">
            <div class="bg-white rounded-2xl shadow-lg p-8">
                <h3 class="text-2xl font-bold mb-6 text-center">SnapDOM 架构概览</h3>
                <div class="mermaid">
                    graph TD
                        A[DOM元素] --> B[SnapDOM核心]
                        B --> C[样式解析器]
                        B --> D[资源加载器]
                        B --> E[渲染引擎]
                        C --> F[CSS样式]
                        C --> G[伪元素]
                        C --> H[影子DOM]
                        D --> I[字体缓存]
                        D --> J[图像缓存]
                        E --> K[SVG输出]
                        E --> L[Canvas渲染]
                        L --> M[PNG/JPG/WebP]
                        
                        style A fill:#f9f,stroke:#333,stroke-width:2px
                        style B fill:#bbf,stroke:#333,stroke-width:2px
                        style K fill:#9f9,stroke:#333,stroke-width:2px
                        style M fill:#9f9,stroke:#333,stroke-width:2px
                </div>
            </div>
        </section>

        <!-- Use Cases -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <span class="section-number">3</span>
                <h2 class="text-3xl font-bold serif-font">使用场景</h2>
            </div>
            <div class="space-y-6">
                <div class="bg-white rounded-xl shadow-lg p-8 border-l-4 border-purple-600">
                    <h3 class="text-xl font-semibold mb-3 flex items-center">
                        <i class="fas fa-palette mr-3 text-purple-600"></i>
                        UI设计验证
                    </h3>
                    <p class="text-gray-700 leading-relaxed">
                        设计师捕获组件截图，验证样式一致性。例如，将React组件转为PNG，用于跨浏览器UI测试。你是否需要快速验证设计稿与实际渲染的差异？
                    </p>
                </div>
                <div class="bg-white rounded-xl shadow-lg p-8 border-l-4 border-purple-600">
                    <h3 class="text-xl font-semibold mb-3 flex items-center">
                        <i class="fas fa-share-alt mr-3 text-purple-600"></i>
                        动态内容分享
                    </h3>
                    <p class="text-gray-700 leading-relaxed">
                        社交媒体平台将用户生成的动态卡片（如数据仪表板）转为JPG，供用户下载分享。
                    </p>
                </div>
                <div class="bg-white rounded-xl shadow-lg p-8 border-l-4 border-purple-600">
                    <h3 class="text-xl font-semibold mb-3 flex items-center">
                        <i class="fas fa-robot mr-3 text-purple-600"></i>
                        自动化测试
                    </h3>
                    <p class="text-gray-700 leading-relaxed">
                        测试工程师使用SnapDOM生成页面截图，集成到CI/CD流程，检测视觉回归。你的测试流程是否需要高效的截图工具？
                    </p>
                </div>
            </div>
        </section>

        <!-- Advantages -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <span class="section-number">4</span>
                <h2 class="text-3xl font-bold serif-font">优势与特色</h2>
            </div>
            <div class="bg-gradient-to-r from-purple-50 to-pink-50 rounded-2xl p-8">
                <div class="grid md:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-2xl font-semibold mb-4 gradient-text">核心优势</h3>
                        <ul class="space-y-3">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-purple-600 mr-3 mt-1"></i>
                                <div>
                                    <strong>极致速度：